package com.khaled.protclass.model.bean.protein;

import com.khaled.protclass.model.util.Constants;

public class ProteinType
{
	private boolean sequence = false;

	private boolean structure = false;

	/**
	 * @param type
	 * @throws Exception
	 */
	public ProteinType(String type)
	{
		if (Constants.SEQUENCE.equals(type.trim().toLowerCase()))
		{
			this.sequence = true;
			this.structure = false;
		}
		else if (Constants.STRUCTURE.equals(type.trim().toLowerCase()))
		{
			this.structure = true;
			this.sequence = false;
		}
	}

	/**
	 * @return sequence
	 */
	public boolean isSequence()
	{
		return sequence;
	}

	/**
	 * @return structure
	 */
	public boolean isStructure()
	{
		return structure;
	}
	
	public static ProteinType getSequenceType()
	{
		return new ProteinType(Constants.SEQUENCE);
	}
	
	public static ProteinType getStructureType()
	{
		return new ProteinType(Constants.STRUCTURE);
	}

}
